package com.youlu.campus.entity.course;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @author : [dengbo]
 * @className : ActivityPopup
 * @description : [小程序活动弹窗表]
 * @createTime : [2022/11/29 11:28]
 */
@Data
@Document(collection = "activity_popup")
@CompoundIndexes({
        @CompoundIndex(name = "idx_date_range", def = "{'startTime':1,'endTime':1}")
})
public class ActivityPopup extends EntityBase {
    /**
     * 名称
     */
    @Indexed
    private String name;
    /**
     * 图片
     */
    private String imageUrl;
    /**
     * 首页 homepage
     * 订单列表 order-list
     * 电子证书领取 e-cert-receive
     */
    @Indexed
    private String popupType;
    /**
     * 跳转地址
     */
    private String redirectUrl;
    /**
     * 开始日期
     */
    private Date startTime;
    /**
     * 结束日期
     */
    private Date endTime;
}
